package com.wjh.mirna.controller;

import com.wjh.mirna.http.Response;
import com.wjh.mirna.model.Cdisease;
import com.wjh.mirna.model.Disease;
import com.wjh.mirna.service.impl.CdiseaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/cdisease")
public class CdiseaseController {
    @Autowired
    CdiseaseServiceImpl cdiseaseService;
    @GetMapping("/queryDisease")
    public Response queryDisease(){
        List<Cdisease> diseases = cdiseaseService.selectDisease();
        return Response.ok(diseases);
    }
}
